//
//  MJBackConfirmView.m
//  MJ
//
//  Created by lina on 2017/12/19.
//  Copyright © 2017年 lina. All rights reserved.
//

#import "MJBackConfirmView.h"

@implementation MJBackConfirmView

- (instancetype)init{
    if (self = [super init]) {
        
        [self creatView];
    }
    return self;
}

- (void)creatView {
    
    UILabel *l = [[UILabel alloc] init];
    l.text = @"测试还没结束,确定退出吗?";
    l.textColor = [UIColor darkTextColor];
    l.font = [UIFont systemFontOfSize:14];
    [self addSubview:l];
    [l mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(self).offset(40);
        make.centerX.mas_equalTo(self);
    }];
    
    _comfirmButton = [UIButton buttonWithType:UIButtonTypeCustom];
    [_comfirmButton setTitle:@"确定" forState:UIControlStateNormal];
    _comfirmButton.titleLabel.font = [UIFont systemFontOfSize:13];
    [_comfirmButton setTitleColor:HEXColor(@"#ff8280") forState:UIControlStateNormal];
    ViewBorderRadius(_comfirmButton, 20, 1, HEXColor(@"#ff8280"));
    [self addSubview:_comfirmButton];
    [_comfirmButton mas_makeConstraints:^(MASConstraintMaker *make) {
        
        
        make.size.mas_equalTo(CGSizeMake(100, 40));
        make.centerX.mas_equalTo(self.mas_centerX).offset((self.width-200)/3);
        make.bottom.mas_equalTo(self).offset(-25);
    }];
    
    
    _cancelButton = [UIButton buttonWithType:UIButtonTypeCustom];
    [_cancelButton setTitle:@"点错了" forState:UIControlStateNormal];
    _cancelButton.titleLabel.font = [UIFont systemFontOfSize:13];
    [_cancelButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
    [self addSubview:_cancelButton];
    ViewBorderRadius(_cancelButton, 20, 0, HEXColor(@"#ff8280"));
    self.cancelButton.backgroundColor = HEXColor(@"#ff8280");
    [_cancelButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.size.mas_equalTo(CGSizeMake(100, 40));
        make.centerX.mas_equalTo(self.mas_centerX).offset(-(self.width-200)/3);
        make.bottom.mas_equalTo(self).offset(-25);
    }];
}



@end
